package vip.xiaonuo.biz.modular.pay.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
* ClassName:SwiftpassConfig
* Description:
* @Author:薛守立
* @CreateTime:2024/9/20 10:46
*/ public class SwiftpassConfig {
    /**
     * 交易密钥
     */
    public static String key;

    public static String mchPrivateKey;

    public static String platPublicKey;

    /**
     * 商户号
     */
    public static String mch_id;

    /**
     * 请求url
     */
    public static String req_url;

    /**
     * 通知url
     */
    public static String notify_url;

    static{
        Properties prop = new Properties();
        InputStream in = SwiftpassConfig.class.getResourceAsStream("/config.properties");
        try {
            prop.load(in);
            key = prop.getProperty("key").trim();
            mchPrivateKey = prop.getProperty("mchPrivateKey").trim();
            platPublicKey = prop.getProperty("platPublicKey").trim();
            mch_id = prop.getProperty("mch_id").trim();
            req_url = prop.getProperty("req_url").trim();
            notify_url = prop.getProperty("notify_url").trim();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
